/***************H5 Call Native ************************/
function getVersion() {
    let version = HarmonyBridge.getVersion();
    document.getElementById("message").innerHTML = version
    console.log("HarmonyBridge", 'getVersion version=' + version);
}

function getToken() {
    let token = HarmonyBridge.getToken();
    document.getElementById("message").innerHTML = token

    console.log("HarmonyBridge", 'getToken token=' + token);
}

function openLogin() {
    HarmonyBridge.openLogin();
    console.log("HarmonyBridge", 'openLogin ');
}

function openLogout() {
    HarmonyBridge.openLogout();
    console.log("HarmonyBridge", 'openLogout ');
}

function openAction() {
    HarmonyBridge.openAction();
    console.log("HarmonyBridge", 'openAction ');
}

function download() {
    let url = 'www.download.com'
    HarmonyBridge.download(url);
    console.log("HarmonyBridge", 'download url' + url);
}

function share() {
    let url = 'www.share.com'
    console.log("HarmonyBridge", 'share url' + url);
    HarmonyBridge.share(url);

}


function getNetworkState() {
    let networkState = HarmonyBridge.getNetworkState();
    document.getElementById("message").innerHTML = networkState
    console.log("HarmonyBridge", 'getNetworkState networkState=' + networkState);
}


/***************  Native Call H5 ************************/

function getUIConfig() {
    let response = { msg: 'ok', data: { back: true, download: false }, code: 0 }
    console.log("HarmonyBridge", 'getUIConfig  response=' + JSON.stringify(response));
    return JSON.stringify(response)
}

function getStatus(id) {
    let response = { msg: 'ok', data: { status: true, id: id }, code: 0 }
    console.log("HarmonyBridge", 'getStatus  response=' + JSON.stringify(response));
    return JSON.stringify(response)
}


